//大学生CSP
#include <bits/stdc++.h>
using namespace std;
int shu[505];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> shu[i];
  }
  sort(shu + 1, shu + n + 1);
  int L = 1, R = n;
  int box = 0;
  while (L < R) {
    if (shu[L] + shu[R] == 0) {
      box++;
      L++, R--;
    } else if (fabs(shu[L]) > fabs(shu[R]))
      L++;
    else if (fabs(shu[L]) < fabs(shu[R]))
      R--;
  }
  cout << box;

  return 0;
}